package cn.foolishbird.hamal.frame.queryParam.fieldHandler;

import cn.foolishbird.hamal.frame.util.DBStringUtils;
import org.springframework.stereotype.Component;

/**
 * 默认查询字段转换器
 * 默认规则： 前端是驼峰，数据库是下划线，默认把驼峰转成下划线
 *
 * @author Eric
 * @version 1.0
 * @date 2020-10-13
 */
public class DefaultFieldConvert implements FieldConvert<String, String> {
    @Override
    public String convert(String hump) {
        return DBStringUtils.toUnderline(hump);
    }
}
